/*
 * *****************************************************************************
 *  Copyright ( c ) 2019 huibur Inc. All Rights Reserved.
 *
 *  This software is the confidential and proprietary information of Huibur Inc
 *  (*Confidential Information*). You shall not disclose such Confidential Information
 *  and shall use it only in accordance with the terms of the license agreement
 *  you entered into with Huibur or a Huibur authorized
 *  reseller (the "License Agreement*).
 *  ******************************************************************************
 */

package com.huibur.devicecheck.service;

import com.huibur.devicecheck.model.param.CheckLocationParam;
import com.huibur.devicecheck.model.po.CheckLocationPO;
import com.huibur.devicecheck.model.query.CheckLocationQuery;
import com.huibur.devicecheck.model.vo.CheckLocationVO;
import com.huibur.devicecheck.model.vo.LocationStaVO;
import com.huibur.devicecheck.model.vo.LocationVO;
import com.huibur.devicecheck.request.ObjRes;
import com.huibur.devicecheck.request.PageRes;

import java.text.ParseException;
import java.util.List;

public interface ICheckLocationService {

    /**
     * 新增位置
     * @param checkLocationParam
     * @return
     */
    ObjRes<Void> insert(CheckLocationParam checkLocationParam);

    /**
     * 删除地址
     * @param id
     * @return
     */
    Boolean deleteById(Long id);

    /**
     * 编辑地址
     * @param id
     * @param checkLocationParam
     * @return
     */
    ObjRes<Void> updateLocation(Long id, CheckLocationParam checkLocationParam);

    /**
     * 地址列表(查询并分页)
     * @param checkLocationQuery
     * @return
     */
    PageRes<CheckLocationVO> selectLocationList(CheckLocationQuery checkLocationQuery);

    /**
     * 根据ID来查询子级
     * @param id
     * @return
     */
    List<CheckLocationPO> selectByParentId(Long id);

    /**
     * 查询所有的节点
     * @param id
     * @return
     */
    List<LocationVO> selectAllLocation(Long id);

    /**
     * 后台管理端首页统计图（地点统计）
     * @param locationId
     * @return
     */
    List<LocationStaVO> locationStatistics(Long locationId) throws ParseException;
}
